package jxau.jwgl.task;

/**
 * TaskExecutor 后台任务执行器
 *
 * @author LongShu 2017/06/10
 */
public interface TaskExecutor {

    <T> void addTask(RunnableCallableTask<T> task);

    <T> void addTask(RunnableCallableTask<T> task, long delay);

    /**
     * @param id 任务ID
     */
    boolean isFinish(String id);

    boolean start();

    boolean stop();

}